package com.lx.user.biz.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.lx.bilibili.entity.User;
import com.lx.user.biz.ISearchService;
import com.lx.user.dao.SearchMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class SearchServiceImpl extends ServiceImpl<SearchMapper, User> implements ISearchService {

    @Autowired
    SearchMapper searchMapper;

    @Override
    public User getUserById(int id) {
        LambdaQueryWrapper<User> lqw = new LambdaQueryWrapper<>();
        lqw.eq(User::getId, id);
        return searchMapper.selectOne(lqw);
    }

}
